package com.zhongxi.guoyuan.OffLineShop.ConnectNet.Api;


import com.zhongxi.guoyuan.OffLineShop.Model.PayInfo;
import com.zhongxi.guoyuan.OffLineShop.Model.ShopList;
import com.zhongxi.guoyuan.OffLineShop.Model.StoreDetail;
import com.zhongxi.guoyuan.entity.BaseResponse;
import com.zhongxi.guoyuan.entity.UpdateResult;
import com.zhongxi.guoyuan.entity.ad.AdResult;
import com.zhongxi.guoyuan.entity.projectItem.ProjectItemResult;
import com.zhongxi.guoyuan.entity.user.center.NewMessage;
import com.zhongxi.guoyuan.entity.user.center.UserExtendResult;
import com.zhongxi.guoyuan.view.seller.offline.mode.OrderInfoOffline;
import com.zhongxi.guoyuan.view.seller.offline.mode.QrCodeBean;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * Created by Administrator on 2018/1/5.
 */

public interface OffLineApi {

    //   baseurl== https://btllm2.511b5.com//
    //  相对url== client/showads/wrxTYeBHFr722QR8FvwcgjHeAG5P%252FyUb/249674dd54091e8d8733ac0a79ac92d9/hnMkitOL/1515150475817/358811079219521.llm
    //   参数=== ?params=pF9V1Zy1Nr3tJEXIvUShCteAJpU9w6fkz19nKGC%2B5hSO8h9GoR1%2Be6HDXrEVlWfpET7UQi7dPTLcubVMbE4HWA%3D%3D&type=4

    //AdResult   @Query("params") String isCheck, @Query("type") int type

    @GET
    Observable<AdResult> getAdApi(@Url String url, @Query("params") String params, @Query("type") int type);

    @GET
    Observable<ResponseBody> getShopListApi(@Url String url, @QueryMap Map<String, String> map);

    @GET
    Observable<ShopList> getMarketshopOfEntry(@Url String url, @Query("params") String isCheck, @Query("page") int page, @Query("orderby") int orderby,
                                              @Query("cateid") String cateid, @Query("lng") String lng, @Query("lat") String lat);

    @GET
    Observable<ProjectItemResult> getStoreCateList(@Url String url, @Query("params") String params);

    @FormUrlEncoded
    @POST
    Observable<ShopList> searchStores(@Url String url, @Query("params") String params, @Query("page") int page, @Field("orderby") int orderby,
                                      @Field("cateid") String cateid, @Field("lng") String lng, @Field("lat") String lat, @Field("content") String content);


    @GET
    Observable<StoreDetail> getStoreDetailApi(@Url String url, @Query("params") String params, @Query("shopid") String shopid);

    @GET
    Observable<ResponseBody> getEvaluateApi(@Url String url, @Query("params") String params, @Query("shopid") String shopid, @Query("page") int page);

    @FormUrlEncoded
    @POST
    Observable<StoreDetail> getAskToPayApi(@Url String url, @Query("params") String params, @Field("secret") String secret);

    @GET
    Observable<UserExtendResult> getTokenApi(@Url String url, @Query("params") String params);

    @FormUrlEncoded
    @POST
    Observable<PayInfo> verifypayApi(@Url String url, @Query("params") String params, @Field("secret") String secret, @Field("verifycode") String verifycode,
                                     @Field("shouldprice") String shouldprice, @Field("redbean") int redbean, @Field("price") String price,
                                     @Field("pwd") String pwd);

    @FormUrlEncoded
    @POST
    Observable<BaseResponse> addCommentApi(@Url String url, @Query("params") String params, @Field("shopid") String shopid,
                                           @Field("orderid") String orderid, @Field("starlevel") int starlevel, @Field("content") String content);

    @GET
    Observable<OrderInfoOffline> sellerOffLineInnermallApi(@Url String url, @Query("params") String params);


    @FormUrlEncoded
    @POST
    Observable<OrderInfoOffline> sellerOrderByTimeApi(@Url String url, @Query("params") String params, @Field("stime") String stime, @Field("etime") String etime);

    @GET
    Observable<ResponseBody> sellerOrderListApi(@Url String url, @Query("params") String params, @Query("page") int page, @Query("userphone") String userphone);

    @GET
    Observable<QrCodeBean> sellerCachierApi(@Url String url, @Query("params") String params);

    /////////////////////////////////////////////////////////////

    @GET
    Observable<ResponseBody> welcomeApi(@Url String url, @Query("params") String params);

    @GET
    Observable<NewMessage> messageApi(@Url String url, @Query("params") String params);

    @GET
    Observable<UpdateResult> upDataVersionApi(@Url String url, @Query("params") String params);

    @GET
    Observable<BaseResponse> adClickListener(@Url String url, @Query("params") String params, @Query("adsid") String adsid);
}


